package com.qijian.tool.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qijian.common.annotation.Excel;
import com.qijian.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.util.Date;

/**
 * 我的信息对象 sys_msg
 *
 * @author qijian
 * @date 2022-06-06
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString
@TableName("sys_msg")
public class Msg extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @TableId
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "ID")
    private Long id;

    @Excel(name = "来源ID")
    @ApiModelProperty(value = "来源ID")
    private String sourceId;

    @Excel(name = "来源类型")
    @ApiModelProperty(value = "来源类型")
    private String sourceType;

    @Excel(name = "等级")
    @ApiModelProperty(value = "等级")
    private String msgLevel;

    @Excel(name = "所属用户")
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "所属用户")
    private Long userId;

    @Excel(name = "标题")
    @ApiModelProperty(value = "标题")
    private String title;

    @Excel(name = "内容")
    @ApiModelProperty(value = "内容")
    private String content;

    @Excel(name = "是否处理", readConverterExp = "f=alse-否，true-是")
    @ApiModelProperty(value = "是否处理（false-否，true-是）")
    private Boolean isRead;

    @Excel(name = "是否关闭", readConverterExp = "f=alse-否，true-是")
    @ApiModelProperty(value = "是否关闭（false-否，true-是）")
    private Boolean isClose;

    @ApiModelProperty("跳转路由")
    private String url;

    @ApiModelProperty("企业微信用户id")
    private String wxUserId;

    @ApiModelProperty("收件人用户名(用于做提醒)")
    private String receiverName;

    @ApiModelProperty("数据的创建人(流程的创建人|消息的创建人[系统])")
    private String createByName;

    @ApiModelProperty("原始单据创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date originCreateDateTime;

    @ApiModelProperty("任务Id")
    private String taskId;

    @ApiModelProperty("流程实列ID")
    private String processInstanceId;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("版本")
    private String version;

}
